// Licensed to Elasticsearch B.V under one or more agreements.
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information.
//
// ███╗   ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
// ████╗  ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
// ██╔██╗ ██║██║   ██║   ██║   ██║██║     █████╗
// ██║╚██╗██║██║   ██║   ██║   ██║██║     ██╔══╝
// ██║ ╚████║╚██████╔╝   ██║   ██║╚██████╗███████╗
// ╚═╝  ╚═══╝ ╚═════╝    ╚═╝   ╚═╝ ╚═════╝╚══════╝
// ------------------------------------------------
//
// This file is automatically generated.
// Please do not edit these files manually.
//
// ------------------------------------------------

#nullable restore

using Elastic.Clients.Elasticsearch.Serverless.Fluent;
using Elastic.Clients.Elasticsearch.Serverless.Serialization;
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Text.Json;
using System.Text.Json.Serialization;

namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search;

public sealed partial class HitsMetadata<T>
{
	[JsonInclude, JsonPropertyName("hits")]
	public IReadOnlyCollection<Elastic.Clients.Elasticsearch.Serverless.Core.Search.Hit<T>> Hits { get; init; }
	[JsonInclude, JsonPropertyName("max_score")]
	public double? MaxScore { get; init; }

	/// <summary>
	/// <para>
	/// Total hit count information, present only if <c>track_total_hits</c> wasn't <c>false</c> in the search request.
	/// </para>
	/// </summary>
	[JsonInclude, JsonPropertyName("total")]
	public Union<Elastic.Clients.Elasticsearch.Serverless.Core.Search.TotalHits, long>? Total { get; init; }
}